<template>
  <div>
    <h1><slot></slot></h1>

    <input type="text" v-model="name" />
  </div>
</template>

<script>
export default {
  name: 'ModuleVModel',
  computed: {
    name: {
      get() {
        return this.$store.state.userModule.name
      },
      set(val) {
        this.$store.commit('userModule/setName', val)
      }
    }
  }
}
</script>
